package com.example.cloud.model.basic;

import com.example.cloud.model.common.CommonModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.math.BigDecimal;

/**
 * Created by wangtao on 2018/6/5.
 * 疗程明细
 */
@Entity(name = "basic_course_details")
@Data
@EqualsAndHashCode(callSuper = false)
public class CourseDetails extends CommonModel {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    // 疗程编号
    @Column(name = "course_id")
    private Long courseId;
    // 项目类型{1：项目 2：产品}
    @Column(name = "item_type")
    private int itemType;
    // 项目编号
    @Column(name = "item_id")
    private Long itemId;
    // 项目名称
    @Column(name = "item_name")
    private String itemName;
    // 项目单价
    @Column(name = "price")
    private BigDecimal price;
    // 数量
    @Column(name = "quantity")
    private int quantity;
}
